package com.fxp.project.jiuselu.web.models.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fxp.project.jiuselu.web.models.order.entity.JslUserBalance;

import java.math.BigDecimal;
import java.util.List;

/**
 * 余额明细
 */
public interface IJslUserBalanceService extends IService<JslUserBalance> {

    /**
     * 添加余额明细
     * @param type 收入类型 1客户提成2业务员提成3提现4佣金奖励5退款
     * @param income 收益金额
     * @param orderId 订单id相关表id  可以为null
     * @param benefitUser 受益人userId
     * @param createBy createBy创建人userId
     */
    void addBalance(Integer type, BigDecimal income, String orderId,Long benefitUser,Long createBy);

    Page<JslUserBalance> findByUserId(Integer page, Integer pageSize, Integer type);

}
